<li class="box-item excursion-item" <%if defined?(obj_id)%>edit-id="<%=obj_id%>"<%end%>>
  <%
    generated_id = "excursion-" + excursion.id.to_s
    generated_id = prefix_id + "-" + generated_id if defined?(prefix_id)
    generated_id = "cat-" + obj_id.to_s + "-" + generated_id if defined?(obj_id)
  %>

  <%= link_to(excursion_url(excursion)) do %>
    <!-- image/icon -->
    <div class="container-img">
      <div class="img-box" id="<%=generated_id%>"></div>
      <%if excursion.draft && excursion.notified_teacher %>
        <div class="excursion-draft">
          <h2 class="draftstyle">
            <i class="fa fa-bell"></i>
            <%=t('excursion.notified')%>
          </h2>
        </div>
      <%elsif excursion.draft%>
        <div class="excursion-draft">
          <h2 class="draftstyle">
            <i class="fa fa-edit"></i>
            <%=t('excursion.draft')%>
          </h2>
        </div>
      <%end%>
    </div>
  <% end %>

  <script>
      document.getElementById("<%=generated_id%>").style.backgroundImage = "url('<%=excursion_raw_thumbail(excursion)%>')";
  </script>

  <!-- Info -->
  <div class="caption">
    <!--Title -->
    <h6>
      <%= link_to excursion.title, excursion %>
    </h6>
    <!--Author -->
    <div class="author">
      <span class="by"><%=t('by')%></span>
      <%= link_to excursion.author.name, excursion.author.subject %>
    </div>
    <!--More info (Likes and Views) -->
    <hr>
    <div class="info-bottom">
      <!--like -->
      <div class="like">
         <% if excursion.post_activity%>
            <div class="count"><%=excursion.post_activity.likes.count.to_s%></div>
            <%= link_like(excursion.post_activity, :title =>t('excursion.actions.favorite'))%>
          <%else%>
            <div class="count">0</div>

          <%end%>
      </div>
      <!--views -->
      <div class="views">
        <%=excursion.visit_count.to_s%>
        <i class="fa fa-eye"></i>
      </div>
    </div>
  </div>
</li>
